import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IllegalTriangleException {
        Scanner in = new Scanner(System.in);
        double side1, side2, side3;
        side1 = in.nextDouble();
        side2 = in.nextDouble();
        side3 = in.nextDouble();
        //下面的代码创建Triangle对象，使用try catch处理异常
        try {
            Triangle t = new Triangle(side1, side2, side3);
        } catch (IllegalTriangleException e) {
            System.out.println("IllegalTriangleException: 边长不符合要求");
        }
    }
}

    class Triangle {
        private double side1;
        private double side2;
        private double side3;

        public Triangle(double side1, double side2, double side3) throws IllegalTriangleException {
            //初始化，如果出现两条边之和小于等于第三边，则抛出 IllegalTriangleException异常对象
            if(side1+side2<side3||side1+side3<side2||side2+side3<side1){
                throw new IllegalTriangleException();
            }
            System.out.println("三角形创建成功");
        }
    }

    class IllegalTriangleException extends Exception {
        public IllegalTriangleException() {
            super();
        }
    }


